
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
input {
	border-top-right-radius: 5px;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
	border-bottom-right-radius: 5px;
}

.div3 {
	border-top-right-radius: 30px;
	border-top-left-radius: 30px;
	border-bottom-left-radius: 30px;
	border-bottom-right-radius: 30px;
	height: 500px;
	float: left;
	font-size: 20px;
	background-color: rgba(150, 0, 0, 0.2);
	width: 39%;
	margin-left: 250px
}

p {
	height: 30px;
	line-height: 400px;
}
</style>
<script type="text/javaScript">
	function test(form) {
		
		var classvalue = form.stuclass.value;
		var classt = /^2016[0-1][0-9]$/;
		
		if ( classvalue == "") {
			alert("班级不能为空");
			document.getElementById('stuclass').focus();
			return false;
		}
		var ct = classt.test(classvalue);
		if (!ct) {
			alert("班级必须为六位数字且前四位必须为2016,第五位不大于1！");
			document.getElementById('user').focus();
			return false;
		}
		return true;
	}
	function succ(){
		var suc = <%=(Integer)request.getAttribute("success") %>
		if(suc==1){
			alert("添加失败！");
		}
		if(suc==2){
			alert("添加成功！");
		}
		document.getElementById('user').focus();
	}
</script>
</head>
<body background="pic/5-13050GZ015.gif"
	onload="succ()">
	<p>

	</p>
	<div align="center">
		<img src="pic/a3cc7cd98d1001e9c7ad571eb00e7bec54e7970a.jpg" alt="Dory">
	</div>
	<div
		style="font-size:20px;float: left;background-image: url(pic/u=4209667892,382162925&amp;fm=21&amp;gp=0.jpg); width: 293px; height: 190px; padding-top: 30px; border-top-right-radius: 10px; border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;">
		<ul type="square" style="height: 20px; line-height: 20px;">
			待办事项
			<li><a href="">修改密码</a></li>
			<li><a href="">添加班级</a></li>
			<li><a href="InsertStudentServlet">添加学生</a></li>
			<li><a href="">添加题目</a></li>
			<li><a href="">添加试卷</a></li>
			<li><a href="">添加测评</a></li>
		</ul>
	</div>
	<form action="addStuServlet" method="post" onsubmit="return test(this)">
		<div class="div3" align="center">
			<p>
				班&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp级：<input type="text"
					name="stuclass" style="width: 300px; height: 20px;">
			</p>
			<p>
				<input type="submit" value="确认" style="width: 50px; height: 30px;">
				<input type="reset" value="取消" style="width: 50px; height: 30px;"
					onclick="document.getElementById('user').focus();">
			</p>
		</div>
	</form>
	<div style="width: 30%; height: 500px; float: left;">
		<img src="pic/wsj2015-3.png" alt="HalloWeen">
	</div>
</body>
</html>